package com.zg.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zg.dao.UserMapper;
import com.zg.pojo.User;
import com.zg.service.UserService;

@Service("userService")
public class UserServiceImpl implements UserService{

	@Resource
	private UserMapper userDao;
	@Override
	public User getUserById(int userId) {
		return this.userDao.selectByPrimaryKey(userId);
	}
	@Override
	public int insert(User record) {
		return this.userDao.insert(record);
	}
	@Override
	public int updateByPrimaryKey(User record) {
		return this.userDao.updateByPrimaryKey(record);
	}
	@Override
	public int deleteByPrimaryKey(int id) {
		return this.userDao.deleteByPrimaryKey(id);
	}
}
